package cn.zxf.note;

import org.hamcrest.Matchers;
import org.junit.Assert;

public class AssertSuper {

    public static void notNull(Object value, String reason) {
        Assert.assertThat(reason, value, Matchers.notNullValue());
    }

    public static void isNull(Object value, String reason) {
        Assert.assertThat(reason, value, Matchers.nullValue());
    }

    public static void isTrue(boolean value, String reason) {
        assertIs(value, true, reason);
    }

    public static void assertIs(Object actual, Object expect) {
        assertIs(actual, expect, "预期值不相等");
    }

    public static void assertIs(Object actual, Object expect, String reason) {
        Assert.assertThat(reason, actual, Matchers.is(expect));
    }

}
